// 主题切换
document.getElementById('themeToggle').addEventListener('click', () => {
        document.body.classList.toggle('dark-mode');
            
                // 保存用户偏好
                    const isDark = document.body.classList.contains('dark-mode');
                        localStorage.setItem('theme', isDark ? 'dark' : 'light');
});

// 显示最后更新时间
document.getElementById('updateDate').textContent = new Date().toLocaleDateString('zh-CN', {
        year: 'numeric',
            month: 'long',
                day: 'numeric'
});

// 初始化主题
if (localStorage.getItem('theme') === 'dark') {
        document.body.classList.add('dark-mode');
}
}
})
})